package com.fpj.sat.vehicle_administrator.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fpj.sat.vehicle_administrator.dao.UsuarioDao;
import com.fpj.sat.vehicle_administrator.domain.Usuario;
import com.fpj.sat.vehicle_administrator.service.UsuarioService;

@Service
public class UsuarioServiceImpl implements UsuarioService{

	private static final Logger logger = Logger.getLogger(UsuarioServiceImpl.class);
	private static final boolean isDebugEnabled = logger.isDebugEnabled();
	@Autowired
	private UsuarioDao usuarioDao;
	
	public Usuario getUsuario(String userName, String password) {
		logger.info("Inicia getUsuario.");
		if(isDebugEnabled){
			logger.debug("userName: " + userName);
			logger.debug("password:" + password);
		}
		return usuarioDao.getUsuario(userName, password);
	}

}
